﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jemgine.Engine.Scripts
{
    [Category("System"), Node]
   public class Show: Data.ScriptNode
    {
       public Show()
       {
           AddInput("Fire", null);
           AddReference("Entity", null);
           AddOutput("Relay", null);
       }

       public override void FireTerminal(int InputID, Data.ScriptPayload Payload)
       {
           if (ReferenceTerminals[0].GetTarget(Payload) != null &&
               ReferenceTerminals[0].GetTarget(Payload) is Data.EntityRecord)
               ( ReferenceTerminals[0].GetTarget(Payload) as Data.EntityRecord ).Hidden = false;
           OutputTerminals[0].Fire(Payload);
       }

      
    }
}
